package com.starnet.yarnmonitor.yarn.vo.result;

import lombok.Data;

@Data
public class Result {
    private boolean success;
    private String msg;
    private Object content;

    public Result(boolean success, String msg, Object content) {
        this.success = success;
        this.msg = msg;
        this.content = content;
    }

    public Result() {
    }
    public static Result success(Object data){
        return new Result(true,"请求成功",data);
    }
    public static Result success(){
        return new Result(true,"请求成功",null);
    }


    public static Result fail(String msg){
        return new Result(false,msg,null);
    }
}
